function PlotGroundTrack(t,R,UTC)
    
    t = t / 3600 / 24;
    %[solar days]Converts all times from seconds to solar days.
    
    Tu = JulianDate(UTC) - 2451545 + t;
    %[solar days]Solar days between the initial universal time and January 1, 2000 at noon.
    
    ERA = 2 * pi * (0.7790572732640 + 1.00273781191135448 * Tu);
    %[rad]Earth rotation angles for all simulation times.
    
    s = numel(t);
    %[]Number of satellite positions that are being plotted.
    
    latitude = zeros(1,s);
    %[]Allocates memory for the satellite latitudes during the simulation time.
    
    longitude = zeros(1,s);
    %[]Allocates memory for the satellite longitudes during the simulation time.
    
    for k = 1:s;
        
        EciToEcef = [cos(ERA(k)), sin(ERA(k)), 0; -sin(ERA(k)), cos(ERA(k)), 0; 0, 0, 1];
        %[]Current matrix that transforms vectors from ECI coordinates to ECEF coordinates.
        
        Recef = EciToEcef * R(1:3,k);
        %[km]Current satellite position WRT the Earth in ECEF coordinates.
        
        latitude(k) = asin(Recef(3) / norm(Recef)) * 180 / pi;
        %[deg]Current satellite latitude.
        
        longitude(k) = atan2(Recef(2),Recef(1)) * 180 / pi;
        %[deg]Current satellite longitude.
        
    end
    
    Window = figure;
    %[]Opens a new window.
    
    Axes = axes('Parent',Window);
    %[]Adds an axes to the specified window.
    
    Earth = imread('Earth.bmp');
    %[]Loads the groundtrack image data.
    
    GroundTrack = image(Earth);
    %[]Adds a plot to the current axes.
    
    ScreenSize = get(0,'ScreenSize');
    %[]Determines the location and dimensions of the current monitor.
    
    set(GroundTrack, ...
        'XData',[-180,180], ...
        'YData',[-90,90]);
    %[]Adjusts the properties of the groundtrack image.
    
    set(Window, ...
        'Color','w', ...
        'NumberTitle','Off', ...
        'Name','SATELLITE GROUND TRACK', ...
        'OuterPosition',ScreenSize);
    %[]Adjusts the properties of the specified window.
    
    
    Longitude = {'180W','165W','150W','135W','120W','105W','90W','75W','60W','45W','30W','15W', ...
        '0','15E','30E','45E','60E','75E','90E','105E','120E','135E','150E','165E','180E'};
    %[]Longitude string.
    
    Latitude = {'90N','75N','60N','45N','30N','15N','0','15S','30S','45S','60S','75S','90S'};
    %[]Latitude string.
    
    set(Axes, ...
        'FontName','Arial', ...
        'FontSize',8, ...
        'FontWeight','Bold', ...
        'NextPlot','Add', ...
        'XColor','k', ...
        'YColor','k', ...
        'XGrid','On', ...
        'YGrid','On', ...
        'XLim',[-180,180], ...
        'YLim',[-90,90], ...
        'XTick',-180:15:180, ...
        'YTick',-90:15:90, ...
        'XTickLabel',Longitude, ...
        'YTickLabel',Latitude);
    %[]Adjusts the properties of the specified axis.
    
    plot(longitude,-latitude, ...
        'Color','r', ...
        'LineStyle','None', ...
        'Marker','.', ...
        'MarkerSize',15, ...
        'Parent',Axes);
    %[]Plots the satellite ground track.
    
    xlabel('Longitude (\circ)','FontSize',16,'Parent',Axes);
    %[]Adds a label to the x-axis.
    
    ylabel('Latitude (\circ)','FontSize',16,'Parent',Axes);
    %[]Adds a label to the y-axis.
    
end
%===================================================================================================